//
//  MXAddEquipmentView.m
//  HNBaseProject
//
//  Created by xujie on 2024/6/3.
//

#import "MXAddEquipmentView.h"

@implementation MXAddEquipmentView

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self createUI];
    }
    return self;
}

- (void)createUI {
    
    self.userInteractionEnabled = YES;
    self.layer.cornerRadius = 6;
    self.layer.masksToBounds = YES;
    self.backgroundColor = [UIColor colorWithHexString:@"#F3F3F3"];
    self.icon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"add_shebei"]];
    [self addSubview:self.icon];
    [self.icon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.offset(11);
        make.centerX.mas_equalTo(self);
        make.height.mas_equalTo(63);
        make.width.mas_equalTo(43);
    }];
    
    self.nameLab = [[UILabel alloc] init];
    self.nameLab.text = @"喵享家智能喂食器";
    self.nameLab.textColor = [UIColor dc_colorWithHexString:@"#000000" alpha:0.7];
    self.nameLab.font = PFRFontMedium(11);
    [self addSubview:self.nameLab];
    [self.nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self);
        make.top.mas_equalTo(self.icon.mas_bottom).offset(6);
    }];
    
    self.typeLab = [[UILabel alloc] init];
    self.typeLab.text = @"可视版";
    self.typeLab.textColor = [UIColor dc_colorWithHexString:@"#000000" alpha:0.7];
    self.typeLab.font = PFRFontMedium(11);
    [self addSubview:self.typeLab];
    [self.typeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.mas_equalTo(self);
        make.top.mas_equalTo(self.nameLab.mas_bottom).offset(0);
    }];
}

- (void)reloadViewWithType:(NSString *)type {
    self.typeLab.text = type;
}

@end
